Skip to content

feat: integrate eino-acp and provider CLI options#21

Closed
bdclaw2026 wants to merge 1 commit intoSTRRL:masterfrom
bdclaw2026:bdclaw/bor-511-acp-cli-provider
Closed

feat: integrate eino-acp and provider CLI options#21
bdclaw2026 wants to merge 1 commit intoSTRRL:masterfrom
bdclaw2026:bdclaw/bor-511-acp-cli-provider

Conversation

@bdclaw2026
Copy link
Contributor

@bdclaw2026 bdclaw2026 commented Mar 10, 2026

Summary

  • integrate github.com/strrl/eino-acp into analyzer runtime
  • add --provider support (claude|codex|gemini) for analyze and debug run
  • switch analyzer model backend from OpenRouter chat model to ACP command-based providers
  • keep semantic labeling on OpenRouter; add --agent-model for analyze and retain --model for debug run
  • update README and add provider command mapping tests

Validation

  • make lint
  • make test

Refs: BOR-511

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the flexibility of the AI-powered log analysis tool by integrating the eino-acp framework. This change allows the analyzer's agent backend to utilize various command-based AI providers like Claude, Codex, and Gemini, moving away from a sole reliance on OpenRouter for agent execution. OpenRouter is now specifically used for semantic labeling, while the new --provider and --agent-model CLI options offer greater control over the agent's choice and configuration. This refactoring improves modularity and expands the range of supported AI models for log analysis.

Highlights

  • ACP Integration: Integrated eino-acp into the analyzer runtime, enabling the use of command-based AI agent providers for log analysis.
  • CLI Options for Providers: Introduced a --provider CLI option for analyze and debug run commands, allowing users to select between Claude, Codex, and Gemini ACP agents.
  • Backend Model Shift: Switched the primary AI agent backend from a direct OpenRouter chat model integration to using ACP command-based providers, while retaining OpenRouter for semantic labeling.
  • Agent Model Specification: Added an --agent-model option for the analyze command to specify the model used by the ACP agent, and retained the --model option for debug run.
  • Documentation Updates: Updated documentation in README.md to reflect the new provider options, command usage, and environment variables.
Changelog
  • README.md
    • Updated examples for analyze and debug run commands to include the new --provider flag.
    • Modified environment variable descriptions to clarify OPENROUTER_API_KEY's role in semantic labeling and added a note about provider-specific authentication.
    • Updated command table to show --provider options for analyze and debug run.
  • cmd/lapp/analyze.go
    • Introduced new global variables analyzeProvider and analyzeAgentModel.
    • Added --provider and --agent-model flags to the analyze command.
    • Updated the analyze command's long description to mention the new provider options.
    • Modified the analyzer.Config passed to AnalyzeWithTemplates to use Provider and Model for the agent, replacing APIKey and analyzeModel.
  • cmd/lapp/debug.go
    • Introduced new global variable debugRunProvider.
    • Added --provider flag to the debug run command.
    • Removed the OPENROUTER_API_KEY environment variable check.
    • Modified the analyzer.Config passed to RunAgent to use Provider and Model for the agent.
  • go.mod
    • Updated github.com/cloudwego/eino to v0.8.0.
    • Updated github.com/cloudwego/eino-ext/adk/backend/local to v0.1.2.
    • Added new dependency github.com/strrl/eino-acp.
    • Added new indirect dependency github.com/coder/acp-go-sdk.
    • Updated indirect dependencies github.com/bytedance/sonic and github.com/stretchr/objx.
  • go.sum
    • Updated checksums to reflect changes in go.mod, including new and updated dependencies.
  • pkg/analyzer/acp_tool_model.go
    • Added a new file defining acpToolCallingModel, which adapts eino-acp.ChatModel to model.ToolCallingChatModel, allowing ACP agents to be used within the existing eino framework.
  • pkg/analyzer/analyzer.go
    • Removed imports related to bytes, encoding/json, io, net/http, openrouter, llmconfig, and otelhttp.
    • Modified the Config struct to accept Provider and Model instead of APIKey and Model.
    • Removed the llmconfig.ResolveModel call and the preflightCheck function.
    • Refactored RunAgent to use einoacp.NewChatModel with a command built by BuildACPCommand.
    • Replaced adk.AgentMiddleware with adk.ChatModelAgentMiddleware and adapted the local backend.
    • Removed the fixupRoundTripper and fixToolMessages functions.
  • pkg/analyzer/local_backend_adapter.go
    • Added a new file defining localBackendAdapter, which implements filesystem.Backend and filesystem.StreamingShell interfaces by wrapping local.Local, facilitating its use with the updated eino filesystem middleware.
  • pkg/analyzer/provider.go
    • Added a new file defining constants for ProviderClaude, ProviderCodex, ProviderGemini.
    • Implemented BuildACPCommand to construct the appropriate command-line arguments for different ACP providers based on the selected provider and model.
  • pkg/analyzer/provider_test.go
    • Added a new file containing unit tests for the BuildACPCommand function, covering default provider, specific providers with models, and invalid provider cases.
Activity
  • bdclaw2026 created the pull request with the title "feat: integrate eino-acp and provider CLI options" and provided a detailed summary of changes and validation steps.
  • The author indicated local validation was performed using make lint and make test.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request refactors the AI-powered log analysis and debugging features to support multiple ACP providers (Claude, Codex, Gemini) by introducing new command-line flags (--provider, --agent-model) and updating the README.md documentation. This involves removing direct OpenRouter integration and related API key checks, adding new Go files to adapt ACP models and local backend interfaces, and updating Go module dependencies. Review comments suggest improving command-line flag consistency by renaming the --model flag in debug run to --agent-model to match the analyze command, and pinning the version of the npx command for the Claude agent to prevent potential instability from @latest.

RunE: runDebugRun,
}
cmd.Flags().StringVar(&debugRunModel, "model", "", "override LLM model (default: anthropic/claude-sonnet-4-6)")
cmd.Flags().StringVar(&debugRunModel, "model", "", "override ACP agent model (passed as --model to provider command)")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The debug run command uses the --model flag to specify the agent model, while the analyze command uses --agent-model for the same purpose. This inconsistency can be confusing. For better usability, consider renaming this flag to --agent-model to align with the analyze command. This would also require renaming the debugRunModel variable.


switch resolved {
case ProviderClaude:
command = []string{"npx", "-y", "@zed-industries/claude-agent-acp@latest"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using @latest for the npx command can lead to unexpected behavior or breakages if a new version of @zed-industries/claude-agent-acp introduces breaking changes. To ensure stability and reproducibility, it's recommended to pin to a specific version (e.g., @zed-industries/claude-agent-acp@0.1.0).


Requires OPENROUTER_API_KEY environment variable to be set.
Requires OPENROUTER_API_KEY environment variable to be set for semantic labeling.
Use --provider to choose ACP agent backend (claude/codex/gemini).
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--provider -> --acp

Long: `Run the AI agent analysis on a previously created workspace directory.

Requires OPENROUTER_API_KEY environment variable to be set.`,
Use --provider to choose ACP agent backend (claude/codex/gemini).`,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto, --provider -> --acp

@bdclaw2026
Copy link
Contributor Author

Addressed owner feedback in this update:\n- Renamed CLI option from --provider to --acp for both analyze and debug run, including help text and README examples.\n- Updated github.com/strrl/eino-acp to commit 4c84efa27879fed55d5f992a37ccfe8463901109.\n\nValidation:\n- make lint\n- make test\n- make build

@bdclaw2026 bdclaw2026 force-pushed the bdclaw/bor-511-acp-cli-provider branch from 032e785 to b3c5151 Compare March 10, 2026 03:37
@bdclaw2026
Copy link
Contributor Author

Updated on latest master (ab74f94) and re-implemented BOR-511 on the current workspace CLI architecture.

What changed:

  • Added --acp provider selection to lapp workspace analyze (claude|codex|gemini).
  • Switched analyzer runtime from direct OpenRouter chat model to github.com/strrl/eino-acp command backend.
  • Added ACP integration helpers:
    • pkg/analyzer/provider.go
    • pkg/analyzer/acp_tool_model.go
    • pkg/analyzer/local_backend_adapter.go
    • pkg/analyzer/provider_test.go
  • Updated dependencies to include github.com/strrl/eino-acp@4c84efa27879fed55d5f992a37ccfe8463901109 with compatible eino backend versions.
  • Updated README examples/command docs for workspace analyze --acp.

Validation:

  • make build
  • make lint
  • make test (Loghub integration tests skipped when LOGHUB_PATH is unset, expected)

Latest commit: b3c5151

@STRRL STRRL closed this Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants